package com.zabra.zl.ui.detailsbank;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.zabra.zl.R;
import com.zabra.zl.base.BaseActivity;
import com.zabra.zl.data.EventMessage;
import com.zabra.zl.ui.inputpwd.InputAginPwdActivity;
import com.zabra.zl.ui.inputpwd.InputPwdActivity;
import com.zabra.zl.utils.HideUtil;

import org.greenrobot.eventbus.EventBus;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 解绑银行卡
 */
public class DetailsBankActivity extends BaseActivity {

    @BindView(R.id.back)
    LinearLayout back;
    @BindView(R.id.tv_unbundle)
    TextView tvUnbundle;
    @BindView(R.id.tv_bank_type)
    TextView tvBankType;
    @BindView(R.id.tv_bank_id)
    TextView tvBankId;
    @BindView(R.id.tv_deposit)
    TextView tvDeposit;
    private String bank, bankid, cardid;
    private Bundle bundle=new Bundle();

    @Override
    public int getLayoutId() {
        return R.layout.activity_details_bank;
    }

    @Override
    public void initView() {
        bank = getIntent().getExtras().getString("bank");
        bankid = getIntent().getExtras().getString("bankid");
        cardid = getIntent().getExtras().getString("cardid");
        tvBankType.setText(bank);
        tvBankId.setText(HideUtil.hideCardNo(bankid));
    }

    @OnClick({R.id.back, R.id.tv_unbundle, R.id.tv_deposit})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.tv_unbundle:
                //解绑
                bundle.putString("cardid",cardid);
                toClass(this, InputAginPwdActivity.class,bundle);
                break;
            case R.id.tv_deposit:
                break;
        }
    }
}
